package com.ibm.util;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class FileUtil {

	public static String readFile2Line(String fileName) throws IOException {
		BufferedReader reader = new BufferedReader(new FileReader(fileName));
		String line;
		StringBuffer buffer = new StringBuffer();
		while ((line = reader.readLine()) != null) {
			buffer.append(line);
		}
		reader.close();
		return buffer.toString();
	}

	public static void main(String[] args) throws IOException {
		String file = "res/dataSourceMetadata.txt";
		String line = readFile2Line(file);
		System.out.println(line);
	}
}
